<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS学习</title>
    <script src="../1.js基础输出.js"></script> <!--引入JS-->
</head>
<body>
<p id="welcome">hello everyone</p>
<script>
    document.write("<p>this is my word pages!</p>");//直接输出
    document.getElementById("welcome").innerHTML="jiekexueyuan.com";//找到p标签的id 然后用innerhtml更改其中的内容
    document.getElementById("welcome").innerHTML="www.jiekexueyuan.com";
    document.getElementById("welcome").innerHTML="http://jiekexueyuan.com";//从上到下依次进行的
    document.write("hello1");
    document.write("hello2");
    document.write("hello3");//都写在一个script里内容比较紧凑,
</script>
<br />
<script>
    document.write("hello1");
</script>
<br />
<script>
    document.write("hello2");
</script>
<br />
<script>
    document.write("hello3");//分别写在script里面有一定的空隙 可以《br>换行
</script>
</body>
</html>